Skip to content

Instantly share code, notes, and snippets.

@Pyseph
Pyseph / ImgStrokeModule.luau
Created January 31, 2025 12:32
an optimized stroke generation module for images, utilizing Roblox's EditableImage, Felzenszwalb & Huttenloche's 1D exact distance transform algorithm, and bitswitching for squeezing out the most performance.
local module = {}
--MCR, Jan 2025
--Will return an editImage, the old size, and the new size if required
--eg: a 100x100 image with a 4 stroke will come back as 110x110 -> stroke * 2 + 2
--Also doesnt check for upper image size
-- NO LONGER SLOW! optimized by Pyseph :-)
function module:MakeStrokeImageFromAssetIdAsync(assetId : number, strokeSize : number) : EditableImage?
strokeSize = math.clamp(strokeSize, 1, 16)
@karpathy
karpathy / microgpt.py
Last active August 12, 2026 18:12
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active August 12, 2026 18:11
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@mmozeiko
mmozeiko / !README.md
Last active August 12, 2026 18:08
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK from newest Visual Studio.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@loggedbytucker-blip
loggedbytucker-blip / pi-commands.md
Last active August 12, 2026 18:07
Raspberry Pi 5 media server — Immich + Jellyfin + Tailscale

Raspberry Pi 5 Media Server — Commands

Immich (photos) + Jellyfin (movies/TV) + Tailscale (access from anywhere). Commands only, in the order they're run in the video.

Tested August 2026 on:

Hardware Raspberry Pi 5, 8GB — CanaKit Starter Kit PRO
@smontlouis
smontlouis / index.html
Created August 12, 2026 09:54
please don't sue me
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="color-scheme" content="light dark" />
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 64%22><circle cx=%2232%22 cy=%2232%22 r=%2230%22 fill=%22%235b7fe5%22/><circle cx=%2224%22 cy=%2228%22 r=%225%22/><circle cx=%2240%22 cy=%2228%22 r=%225%22/></svg>"
/>
@vialuch
vialuch / gpt-chat-interactive-dollhouse-mcp-guide.md
Created August 5, 2026 22:13
:在 GPT Chat 窗口制作可点击互动娃娃屋|MCP Apps 通用搭建思路

在 GPT Chat 窗口里做一个可点击的互动娃娃屋

Made by Dan & Joy

1. 最终效果是什么

目标不是在聊天里贴一张静态图片,也不是让用户跳转到外部网页,而是让 ChatGPT 在回复中直接渲染一张可交互的卡片:

  • 卡片内显示人物立绘、姿势、镜头、状态值和当前剧情片段;
  • 用户可直接点击人物、按钮、姿势或镜头;
  • 每次点击都会调用 MCP 工具,更新服务器中的真实会话状态;
@asheroto
asheroto / README.md
Last active August 12, 2026 17:53
Bypass Windows 11 Upgrade Assistant / PC Health Check / TPM and CPU Settings. Ignore PC Health Check results.

Bypass Windows 11 Upgrade Assistant / Setup Hardware Checks (TPM, CPU, RAM)

This PowerShell script allows you to bypass TPM 2.0, unsupported CPU, and memory checks enforced by the Windows 11 Upgrade Assistant and setup.exe from Windows installation media. It eliminates common upgrade blocks such as:

  • This PC doesn't currently meet Windows 11 system requirements.
  • TPM 2.0 must be supported and enabled on this PC.
  • The processor isn't currently supported for Windows 11.

What It Does